// $Id: php_qqwry.h 4 2008-08-10 06:45:44Z glinus $

#ifndef PHP_QQWRY_H
#define PHP_QQWRY_H 1

#ifdef ZTS
#include "TSRM.h"
#endif

#include "qqwry.h"

ZEND_BEGIN_MODULE_GLOBALS(qqwry)
    long counter;
ZEND_END_MODULE_GLOBALS(qqwry)

#ifdef ZTS
#define QQWRY_G(v) TSRMG(qqwry_globals_id, zend_qqwry_globals *, v)
#else
#define QQWRY_G(v) (qqwry_globals.v)
#endif

#define PHP_QQWRY_VERSION "1.0"
#define PHP_QQWRY_EXTNAME "qqwry"

typedef struct _php_qqwry_library {
    FILE *fp;
    char *data_path;
} php_qqwry_library;

#define PHP_QQWRY_LIBRARY_RES_NAME "QQWry Library"

PHP_MINIT_FUNCTION(qqwry);
PHP_MSHUTDOWN_FUNCTION(qqwry);
PHP_RINIT_FUNCTION(qqwry);
PHP_MINFO_FUNCTION(qqwry);

PHP_FUNCTION(qqwry_query);

PHP_FUNCTION(qqwry_open);
PHP_FUNCTION(qqwry_popen);
PHP_FUNCTION(qqwry_close);

extern zend_module_entry qqwry_module_entry;
#define phpext_qqwry_ptr &qqwry_module_entry

#endif
